package base;

import java.io.File;
import java.io.FileFilter;

public class LambdaOne {

    public void choosefile() {
        //old:筛选隐藏文件
        File[] files = new File(".").listFiles(new FileFilter() {
            public boolean accept(File pathname) {
                return pathname.isHidden();
            }
        });

        //new
        File[] listFiles = new File(".").listFiles(File::isHidden);//::语法表示将该方法作为值
    }

    public static void main(String[] args) {

    }
}
